branch-4.0: [fix](filecache) unify TTL expiration calculation and persist pending rowset timestamps#62287
Open
freemandealer wants to merge 1 commit intoapache:branch-4.0from
Open
Conversation
… rowset timestamps The file cache TTL flow used inconsistent expiration rules across write, read, and warmup paths. Query paths clamped expired values to 0, while writer and some warmup paths could still produce non-zero absolute expiration timestamps. Pending rowsets also delayed persisting newest_write_timestamp, which let cache writes use a different time base from later reads and warmup tasks. This change adds a shared helper to calculate file cache expiration with validation, overflow protection, and expired-value clamping. It reuses the same logic in rowset read, rowset write, and cloud warmup paths so the same cache hash gets the same expiration_time consistently. This change also persists newest_write_timestamp into pending/prepared rowset meta during initialization when the context already provides a valid value. That keeps import/write, query, and warmup flows aligned on the same timestamp base and avoids generating different TTL cache directories for the same object.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
This PR backports commit
f3156c9ef71tobranch-4.0and fixes file cache TTL/expiration inconsistency in Doris BE.expiration_time.newest_write_timestampfor pending/prepared rowsets earlier to avoid timestamp drift between write and later read/warmup flows.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?